package com.qingmu.club.minaapi.plus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 中台-登录账号(包含B端O端)
 * </p>
 *
 * @author duke
 * @since 2019-12-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class AdminUser extends Model<AdminUser> {

    private static final long serialVersionUID=1L;

    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer userId;

    /**
     * 登录名称(手机号码)
     */
    private String userName;

    /**
     * 密码
     */
    private String password;

    /**
     * 真实姓名
     */
    private String realName;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 用户描述
     */
    private String userDesc;

    /**
     * 登录时间
     */
    private Date loginTime;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 最后登录IP
     */
    private String loginIp;

    /**
     * 用户群组
     */
    private Integer userGroup;

    /**
     * 注册时间
     */
    private Date createTime;

    /**
     * 用户头像url
     */
    private String avatar;

    /**
     * 所属俱乐部ID
     */
    private String clubId;

    /**
     * 登录类型1-俱乐部B端2-俱乐部O端
     */
    @TableField("logIn_type")
    private Integer loginType;

    /**
     * 俱乐部名称
     */
    private String clubName;

    /**
     * 是否B端管理员账号0-否1-是
     */
    private Integer isAdmin;


    public static final String USER_ID = "user_id";

    public static final String USER_NAME = "user_name";

    public static final String PASSWORD = "password";

    public static final String REAL_NAME = "real_name";

    public static final String EMAIL = "email";

    public static final String USER_DESC = "user_desc";

    public static final String LOGIN_TIME = "login_time";

    public static final String STATUS = "status";

    public static final String LOGIN_IP = "login_ip";

    public static final String USER_GROUP = "user_group";

    public static final String CREATE_TIME = "create_time";

    public static final String AVATAR = "avatar";

    public static final String CLUB_ID = "club_id";

    public static final String LOGIN_TYPE = "logIn_type";

    public static final String CLUB_NAME = "club_name";

    public static final String IS_ADMIN = "is_admin";

    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

}
